<template>
  <router-view />
</template>

<script lang="ts" setup>
import { onMounted } from 'vue';
import { agcApis } from './assets/apis/AgcApis'
import { userInfoStore } from './assets/userStore/userStore'

const userStore = userInfoStore()
onMounted(async () => {
  if (userStore.phoneNumber && userStore.password) {
    let value = await agcApis.getCurrectUser()
    if (!value) {
      agcApis.authByPasswordNoCrypto(userStore.phoneNumber!, userStore.password!)
        .then((value) => {
          if (value) {
            console.log("自动登录成功");
          } else {
            console.log("自动登录失败");
          }
        })
    }
  }
})


</script>